<template>
	
	<div style="width: 100%;height: 2000px;">
		
		<div style="width: 60%;height: 1000px;">
			
			<h2>我的班级</h2>
			
			<table border="1px" style="width: 100%;height: 10%;">
				
				<tr>
					<th>教师ID</th>
					<th>教师姓名</th>
					<th>班级编号</th>
					<th>班级名称</th>
					<th>课程编号</th>
					<th>课程名称</th>
					<th>操作</th>
				</tr>
				<tr v-for="(x,idx) in data.myTasks">
					<td>{{x.user.uid}}</td>
					<td>{{x.user.uname}}</td>
					<td>{{x.clz.clzno}}</td>
					<td>{{x.clz.clzname}}</td>
					<td>{{x.course.cno}}</td>
					<td>{{x.course.cname}}</td>
					<td><router-link :to="{path:'/tea/doMark' , query:{clzno:x.clz.clzno , cno:x.course.cno }}">登分</router-link></td>
				</tr>
				
			</table>
			
		</div>
		
		
	</div>
	
</template>

<script setup>
	
	import {ref,reactive,onMounted} from 'vue';
	import {$get} from '@/ajax';
	import myalert from '@/store/index.js';
	import {useRoute,useRouter} from "vue-router";
	
	const route = useRoute();
	const router = useRouter();
	
	
	const data = reactive({
		myTasks:[]
	})
	

	onMounted(()=>{
		$get("/api/fore/tea/findMyTask")
		.then((resp)=>{
			data.myTasks = resp.data.data;
			console.log("===========")
			console.log(data.myTasks)
		})
	})
	
	
	
</script>

<style>
</style>
